package com.zeyi.chat.views;

import javafx.scene.Scene;
import javafx.scene.layout.*;
import javafx.scene.paint.Paint;

/**
 * @author zeyi
 */
public class CircleBorder {
    public CircleBorder(Scene scene, double radius, String borderColor) {
        Pane root = (Pane) scene.getRoot();
        Background bg = new Background(new BackgroundFill(Paint.valueOf("#FFFFFF"), new CornerRadii(radius), null));
        Border border = new Border(new BorderStroke(Paint.valueOf(borderColor),
                BorderStrokeStyle.SOLID, new CornerRadii(radius), null));
        root.setBackground(bg);
        root.setBorder(border);
        scene.setFill(Paint.valueOf("#ffffff00"));
    }
}
